VR10LngtoWrd

V = Variable

R = Reading functions

The VR10LngtoWrd function breaks up a LONG variable into two variables of Word.
The function is passed the Long variable that will be broken up into two variables word: “Word high part” and “Word low part”.

IMPLEMENTATION

VR10LngtoWrd (slLong,swWordUp,swWordDw)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN SYSTEM / GLOBAL SlLong L Long variable by break up
OUT SYSTEM / GLOBAL SwWordUp W Word that represents the UPPER part of the Long
OUT SYSTEM / GLOBAL SwWordDw W Word that represents the LOWER part of the Long

Esempio

MAIN:
 
slLong = AnAsse:setpos			        ;Carica il setpos di un device sulla Long da scomporre
 
VR10LngtoWrd (slLong,swWordUp,swWordDw)	        ;Scompone la variabile Long
 
aswBuffer[200] = swWordDw			;Imposta Parte bassa sul Buffer
aswBuffer[201] = swWordUp 			;Imposta Parte alta sul Buffer
 
......
.....
END

Note